package com.baizhi.controller;

import com.baizhi.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/User")
public class UserController {
    @Autowired
    private UserService us;
    @RequestMapping("/login")
    public  String  login(String name,String pwd){
        boolean login = us.login(name, pwd);
        if (login){
            return "forward:/page/pageInfo.do";
        }else{
            return "forward:/login.jsp";
        }
    }
}
